<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
	<script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=2KLUV5cmWj6c9cRH7cfsNWW1ixeGG5Fg"></script>
    <title>根据关键字本地搜索</title>
    <style>
        body,
        html,
        #container {
            overflow: hidden;
            width: 100%;
            height: 100%;
            margin: 0;
            font-family: "微软雅黑";
        }
        .info {
        z-index: 999;
        width: auto;
        min-width: 22rem;
        padding: .75rem 1.25rem;
        margin-left: 1.25rem;
        position: fixed;
        top: 1rem;
        background-color: #fff;
        border-radius: .25rem;
        font-size: 14px;
        color: #666;
        box-shadow: 0 2px 6px 0 rgba(27, 142, 236, 0.5);
    }
    </style>
</head>
<body>
    <div id="container"></div>
    <div class = "info">返回北京市“景点”关键字的检索结果，并展示在地图上</div>
</body>
</html>
<script type="text/javascript">
	// 百度地图API功能
	var map = new BMapGL.Map("container");          
	map.centerAndZoom(new BMapGL.Point(116.404, 39.915), 15);
	var local = new BMapGL.LocalSearch(map, {
		renderOptions:{map: map}
	});
	local.search("景点");
</script>
